package com.renren.project.core.rulehandler.handler;

import com.renren.project.core.rulehandler.entity.Rule;
import com.renren.project.core.rulehandler.RuleConstant;
/**
 * @author liyang
 * @version 1.0.0
 * @ClassName AddressRule
 * @Description 具体规则- 例子1
 * @createTime 21:24:00 2021/08/22
 */
public class AddressRule extends AbstractRule{

    @Override
    public boolean execute(Rule rule) {
        System.out.println("AddressRule invoke!");
        if (rule.getAddress().startsWith(RuleConstant.MATCH_ADDRESS_START)) {
            return true;
        }
        return false;
    }
}
